interface UserStoreState {
  token: string;
}

export const useUserStore = defineStore('user', {
  state: (): UserStoreState => ({
    token: ''
  }),
  getters: {},
  actions: {
    /**
     * 设置token
     * @param token
     */
    settoken(token: string) {
      this.token = token;
    }
  },
  persist: {
    key: 'user',
    pick: ['token']
  }
});
